﻿#region License
/*
    Copyright (c) 2010, Paweł Hofman (CodeTitans)
    All Rights Reserved.

    Licensed under the Apache License version 2.0.
    For more information please visit:

    http://codetitans.codeplex.com/license
        or
    http://www.apache.org/licenses/


    For latest source code, documentation, samples
    and more information please visit:

    http://codetitans.codeplex.com/
*/
#endregion

using System;
using System.Net;

namespace CodeTitans.Bayeux
{
    /// <summary>
    /// Event data transmitted together with HttpConnection.
    /// </summary>
    public class HttpConnectionEventArgs : EventArgs
    {
        /// <summary>
        /// Init constructor.
        /// </summary>
        public HttpConnectionEventArgs(HttpConnection connection, HttpStatusCode statusCode, string statusDescription)
        {
            Connection = connection;
            StatusCode = statusCode;
            StatusDescription = statusDescription;
        }

        /// <summary>
        /// Init constructor.
        /// </summary>
        public HttpConnectionEventArgs(HttpConnection connection, HttpStatusCode statusCode, string statusDescription, string data)
        {
            Connection = connection;
            StatusCode = statusCode;
            StatusDescription = statusDescription;
            Data = data;
        }

        #region Properties

        public HttpConnection Connection
        { get; private set; }

        public HttpStatusCode StatusCode
        { get; private set; }

        public string StatusDescription
        { get; private set; }

        public string Data
        { get; private set; }

        #endregion
    }
}
